import request from "@/util/request";
// 文件上传 api 函数简单封装
// export const uploadApi = ({ file }) => {
//   const formData = new FormData();
//   formData.append('file', file);
//   // ... 略，formData 其他实现逻辑
//   return axios({
//     url: '/api/upload',
//     method: 'POST',
//     data: formData,
//     headers: {
//       'Content-type': 'multipart/form-data',
//     },
//   });
// };

export const test = () => {
  return request({
    url: "/user/test",
    method: "GET",
  });
};
export const getUserInfo = (data) => {
  return request({
    url: "/user/getUserInfo",
    method: "POST",
    data,
  });
};
export const updateBgImg = (data) => {
  return request({
    url: "/user/updateBgImg",
    method: "POST",
    data,
  });
};
export const updateAvatar = (data) => {
  return request({
    url: "/user/updateAvatar",
    method: "POST",
    data,
  });
};
